﻿using System;
using System.Runtime.CompilerServices;
using System.Security.Cryptography.X509Certificates;

namespace hello_world
{
    class Program
    {
        public bool Method1(int n)
        {
            bool flag = true;
            if (n < 2)
                return false;
            else
                for (int i = 2; i <= n; i++)
                {
                    if(n % i == 0)
                    return flag;
                }
            return flag;  
         
        }
        static void Main(string[] args)
        {
            int input = 1;
            Console.WriteLine("请输入一个整数");
            input = Convert.ToInt32(Console.ReadLine());
            Program m =new Program();
            bool flag = m.Method1(input);
            if(flag)
            {
                for(int i = 2; i <= input; i++)
                {
                    int n = i;
                    while((input%n) == 0)
                    {
                        if (m.Method1(input))
                        {
                            Console.Write("{0}  ", n);
                            input = input / n;
                        }
                    }
                }
            }           
        }
    }
}